﻿	For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

@{
	Layout = null;
}
<link href="~/lib/layui/css/layui.css" rel="stylesheet" />
<script src="~/lib/layui/layui.js"></script>
<script src="~/js/js.cookie.js"></script>
<script src="~/js/moment.js"></script>
<script src="~/lib/jquery/dist/jquery.js"></script>

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Demo</title>
	<!-- 请勿在项目正式环境中引用该 layui.css 地址 -->
	<link href="//unpkg.com/layui@2.9.20/dist/css/layui.css" rel="stylesheet">
	@* 导出引入文件 *@
	<title>Layui with XLSX</title>
	<!-- 引入Layui的CSS -->
	@* <link rel="stylesheet" href="path/to/layui.css"> *@
	<!-- 引入XLSX库的CDN -->
	<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js"></script>
	<title>Layui 导入按钮示例</title>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/css/layui.css">
	<script src="https://cdnjs.cloudflare.com/ajax/libs/layui/2.6.8/layui.js"></script>
</head>
<body>
	<form class="layui-form" action="">
		<div class="layui-form-item">
			<div class="layui-form-item">

				<div class="layui-inline">
					<label class="layui-form-label">客户</label>
					<div class="layui-input-block">
						<select id="permissionState" lay-filter="testSelect2">
							<option value="0">请选择</option>
							<option value="1">有效</option>
							<option value="2">无效</option>
						</select>
					</div>
				</div>

				<div class="layui-inline">
					<label class="layui-form-label">权限名称</label>
					<div class="layui-input-block">
						<input type="text" id="permissionName" placeholder="请输入" class="layui-input">
					</div>

				</div>

				<div class="layui-inline">
					<label class="layui-form-label">权限类型</label>
					<div class="layui-input-block">
						<select name="interest" lay-filter="testSelect1" id="permissionTypeId">
							<option value="0" selected>请选择</option>
						</select>
					</div>
				</div>

				<div class="layui-inline">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-block">
						<select id="permissionState" lay-filter="testSelect2">
							<option value="0">请选择</option>
							<option value="1">有效</option>
							<option value="2">无效</option>
						</select>
					</div>
				</div>

				<button type="button" class="layui-btn layui-bg-bluee">打印</button>
				<button type="button" class="layui-btn layui-bg-blue">导出</button>
				<button type="button" class="layui-btn layui-bg-red" lay-on="test-iframe-curl" onclick="AddPermission()">+新增</button>
			</div>
		</div>

		
		<div id="demo-laypage-all"></div>
	</form>


	<script src="//unpkg.com/layui@2.9.18/dist/layui.js"></script>
	<script>

		layui.use(['form', 'laydate', 'util'], function () {
			var form = layui.form
			var upload = layui.upload;
			var layer = layui.layer;
			var laypage = layui.laypage;
			var $ = layui.$;
			var layer = layui.layer;
			var util = layui.util;


			$(function () {
				ShowWorkCenter();
			})

		});

		//导出
		function exportTableToExcel() {
			var table = document.querySelector("table.layui-table tbody");
			var ws = XLSX.utils.table_to_sheet(table);
			var wb = XLSX.utils.book_new();
			XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
			XLSX.writeFile(wb, "工作中心列表.xlsx");
		}

		document.querySelector(".layui-btn.layui-bg-blue").addEventListener("click", exportTableToExcel);

	</script>


</body>
</html>
